
<script>
    //this is a jQuery example on how you can easily manage animations
    //
    // with the selector $ of jquey you can select elements of the page easily:
    // $(".theClass") takes all elements with that css class theClass
    // $("#theID") takes element with id = theID
    // $(document) takes the document page
    // $("div") takes all div of the page
    // then after the dot you can call al lot of function on that elements that you've selected before
    // so for exmaple:
    // $(".buttonMenu").addClass("test") add a css class "test" to all elements with class "buttonMenu""
    
    var num=1;//numeric
    var str="stringa";//string
    var data= new Date() //date
    var fnc= function(){}; //funzione
    var obj={}; //oggetto
    var arr=[];//array
    
    var arr1 = [1,2,3];
    for (i=0;i<arr1.length;i++) {
        //alert(arr1[i]);
    }
    
    
    var obj1 = {
        num1:1,
        str1:"",
        date1:new Date(),
        fnc1: function () {},
        arr1: [],
        obj2:{
            num2:1
        }
    }
        
    $(document).ready(function() {
        var par= {left:"-=1000"};
        
        //move the all the object with classes "hover" 1000px to the left;
        $(".hover").animate(par,1);
        //mouse hover on element with class .buttonMenu
        
        $(".buttonMenu").hover(function() {
            //on mouse over do this
            $(this).prev().animate({left: '+=500'}); //this refer to the object that the mouse point
        },function() {
            //on mouse out do this
            $(this).prev().animate({left: '-=500'}); //this refer to the object that the mouse point
        })
    });
</script>
<div id="menu">
    <div class="hover home">&nbsp;</div>
    <a class="buttonMenu home" href="index.php" title='home'>HOME</a>
    <div class="hover aboutMe">&nbsp;</div>
    <a class="buttonMenu aboutMe" href="aboutme.php" title='AboutMe'>ABOUT ME</a>
    <div class="hover gallery">&nbsp;</div>
    <a class="buttonMenu gallery" href="gallery.php" title="gallery">GALLERY</a>         
    <div class="hover contatti">&nbsp;</div>
    <a class="buttonMenu contatti" href="mailto:jacopo.ghislazoni@gmail.com" title='contatti'><?php echo $lang->aMsg[1]; ?></a>
    <div class="hover news">&nbsp;</div>
    <a class="buttonMenu news" href="news.php" title='news'>NEWS</a>
</div>
